package com.yuq.sunrise.model;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 用户信息
 * @author Administrator
 *
 */
@Table(name = "USER_INFO")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    // @Id表示该字段对应数据库表的主键id
    // @GeneratedValue中strategy表示使用数据库自带的主键生成策略.
    // @GeneratedValue中generator配置为"JDBC",在数据插入完毕之后,会自动将主键id填充到实体类中.类似普通mapper.xml中配置的selectKey标签
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "JDBC")
    private Long rowId;

    private String loginName;

    private String password;

    private String realName;

    private String telPhone;

    private String emailAddress;

    private Date createDate;

    private Date loginTime;

    private Integer loginCount;

    private String isVal;

    /**
     * create by: yuq
     * description: 默认构造
     * create time: 2019-06-08 19:57
     *
     * @param
     * @return
     */
    public User() {
        super();
    }

    /**
     * create by: yuq
     * description: 构造函数，不包含主键字段
     * create time: 2019-06-08 19:57
     *
     * @param
     * @return
     */
    public User(String loginName, String password, String realName, String telPhone, String emailAddress, Date createDate, Date loginTime, Integer loginCount, String isVal) {
        this.loginName = loginName;
        this.password = password;
        this.realName = realName;
        this.telPhone = telPhone;
        this.emailAddress = emailAddress;
        this.createDate = createDate;
        this.loginTime = loginTime;
        this.loginCount = loginCount;
        this.isVal = isVal;
    }

    /**
     * create by: yuq
     * description: 构造函数，所有字段
     * create time: 2019-06-08 19:57
     *
     * @param
     * @return
     */
    public User(Long rowId, String loginName, String password, String realName, String telPhone, String emailAddress, Date createDate, Date loginTime, Integer loginCount, String isVal) {
        this.rowId = rowId;
        this.loginName = loginName;
        this.password = password;
        this.realName = realName;
        this.telPhone = telPhone;
        this.emailAddress = emailAddress;
        this.createDate = createDate;
        this.loginTime = loginTime;
        this.loginCount = loginCount;
        this.isVal = isVal;
    }

    public Long getRowId() {
        return rowId;
    }

    public void setRowId(Long rowId) {
        this.rowId = rowId;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getTelPhone() {
        return telPhone;
    }

    public void setTelPhone(String telPhone) {
        this.telPhone = telPhone;
    }

    public String getEmailAddress() {
        return emailAddress;
    }

    public void setEmailAddress(String emailAddress) {
        this.emailAddress = emailAddress;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

    public Integer getLoginCount() {
        return loginCount;
    }

    public void setLoginCount(Integer loginCount) {
        this.loginCount = loginCount;
    }

    public String getIsVal() {
        return isVal;
    }

    public void setIsVal(String isVal) {
        this.isVal = isVal;
    }
}